-----------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  D:\Ellen\Dropbox\Pajaro_AgInnovation\Submission\JAERE\Replication_Code\Log\D
> inD_quarterly_unbalanced_log.log
  log type:  text
 opened on:  29 Nov 2023, 14:08:50

. *log using "D:\Ellen\Dropbox\Pajaro_AgInnovation\Submission\JAERE\Replication_Code\Log\
> DinD_annual_log.log", replace
. 
. 
. *SELECT DATASET
. global dataset 1         

. global quarterly "Data\Parcel_Clean_20230626.dta"

. global yearrun "Data\Parcel_Clean_yearrun_20230626.dta"

. 
. if $dataset == 1 use $quarterly, clear

. if $dataset == 2 use $yearrun, clear

. 
. *GENERATE LAG DELIVERIES -- TOGGLE ON/OFF BASED ON CALLED DATASET
. sort parcelnum quarter 

. by parcelnum: gen lagdelivered = delivered[_n-1]
(754 missing values generated)

. 
. *sort parcelnum year_run 
. *by parcelnum: gen lagdelivered = delivered[_n-1]
. 
end of do-file

. do "C:\Users\Ellen\AppData\Local\Temp\STD5d70_000000.tmp"

. ********************************************************************************
. *Table 2 and 8: QUARTERLY EXTRACTION DIFF IN DIFF: ROBUSTNESS TEST
. ********************************************************************************
. *Table 8 is unbalanced. Table 2 second half is balanced. 
. 
. *ALTER FOR BALANCED OR UNBALANCED ROBUSTNESS TABLE (AND CHANGE HOW TABLE IS SAVED):
. *Balance the panel
. *bysort parcelnum: gen ntime = [_N]
. *sum ntime
. *keep if ntime==`r(max)'
. 
. *DROP 2010
. drop if year==2010
(2,724 observations deleted)

. 
. *Make sample set consistent across robustness tests
. drop if delivered ==. 
(0 observations deleted)

. drop if CL_zonedate ==. 
(6,035 observations deleted)

. drop if gw_depth ==. 
(7,072 observations deleted)

. 
. *Calculate pre-period mean for inside zone to report in table 
. bys inside: sum extraction if post==0

-----------------------------------------------------------------------------------------
-> inside = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |      2,336    18.12563    30.50893          0    432.752

-----------------------------------------------------------------------------------------
-> inside = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |        444    25.83596    42.92653          0    347.453


. preserve

. drop if lagdelivered==.
(407 observations deleted)

. bys inside: sum extraction if post==0 

-----------------------------------------------------------------------------------------
-> inside = 0

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |      2,336    18.12563    30.50893          0    432.752

-----------------------------------------------------------------------------------------
-> inside = 1

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
  extraction |        435    26.34043     43.2228          0    347.453


. restore

. 
. *Quarterly Robustness table: 
. eststo clear

. *Column 1: Baseline
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county if year<2016, fe cl
> uster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     16,101
Group variable: parcelnum                       Number of groups  =        728

R-sq:                                           Obs per group:
     within  = 0.1951                                         min =          2
     between = 0.0061                                         avg =       22.1
     overall = 0.0593                                         max =         25

                                                F(31,727)         =      13.30
corr(u_i, Xb)  = -0.0494                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 728 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -7.313467   2.360151    -3.10   0.002    -11.94699   -2.679943
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |   -18.4202   3.437073    -5.36   0.000    -25.16798   -11.67243
         1 2011  |  -8.199651   .6815966   -12.03   0.000    -9.537783   -6.861518
         1 2012  |  -4.849508    .649877    -7.46   0.000    -6.125368   -3.573649
         1 2013  |   -8.07402   .6884923   -11.73   0.000     -9.42569   -6.722349
         1 2014  |  -3.533957   .6148657    -5.75   0.000    -4.741081   -2.326833
         1 2015  |  -6.822547    .563454   -12.11   0.000    -7.928738   -5.716356
         2 2008  |   10.51256   1.473949     7.13   0.000     7.618858    13.40627
         2 2009  |          0  (empty)
         2 2011  |   1.781389   .6610866     2.69   0.007     .4835222    3.079256
         2 2012  |   4.368021   .7891289     5.54   0.000     2.818777    5.917264
         2 2013  |   8.341732   .9425808     8.85   0.000     6.491227    10.19224
         2 2014  |    4.80802   .6711837     7.16   0.000      3.49033    6.125709
         2 2015  |   3.808288   .5359889     7.11   0.000     2.756017    4.860559
         3 2008  |          0  (empty)
         3 2009  |   17.27508   1.240993    13.92   0.000     14.83872    19.71144
         3 2011  |   13.24399   1.109717    11.93   0.000     11.06535    15.42262
         3 2012  |   13.72528   1.138813    12.05   0.000     11.48952    15.96103
         3 2013  |   15.11814   1.184415    12.76   0.000     12.79285    17.44342
         3 2014  |   15.10456   1.050535    14.38   0.000     13.04211      17.167
         3 2015  |   15.16916   1.005957    15.08   0.000     13.19424    17.14409
         4 2008  |     1.6876   1.181754     1.43   0.154    -.6324586    4.007659
         4 2009  |  -2.120796   .6830929    -3.10   0.002    -3.461866   -.7797259
         4 2011  |  -1.859438   .6093311    -3.05   0.002    -3.055696   -.6631792
         4 2012  |  -2.689117   .6314948    -4.26   0.000    -3.928888   -1.449345
         4 2013  |   1.693542   .5497103     3.08   0.002     .6143334    2.772752
         4 2014  |  -2.727937    .614389    -4.44   0.000    -3.934125   -1.521749
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.002081   1.419106    -1.41   0.159    -4.788117    .7839544
         2009 1  |    1.67041   1.392581     1.20   0.231     -1.06355    4.404371
         2009 2  |          0  (omitted)
         2011 1  |  -1.218312   .9361967    -1.30   0.194    -3.056284    .6196597
         2011 2  |          0  (omitted)
         2012 1  |   .2870834    1.19563     0.24   0.810    -2.060216    2.634382
         2012 2  |          0  (omitted)
         2013 1  |   .9133686   .9357079     0.98   0.329    -.9236436    2.750381
         2013 2  |          0  (omitted)
         2014 1  |   .8534559   .9846926     0.87   0.386    -1.079725    2.786636
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
           _cons |   13.49834   .4965592    27.18   0.000     12.52347     14.4732
-----------------+----------------------------------------------------------------
         sigma_u |  23.317145
         sigma_e |  17.087734
             rho |  .65059509   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est1 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 2: Main specification w/ deliveries
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county delivered if year<2
> 016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     16,101
Group variable: parcelnum                       Number of groups  =        728

R-sq:                                           Obs per group:
     within  = 0.1968                                         min =          2
     between = 0.0033                                         avg =       22.1
     overall = 0.0692                                         max =         25

                                                F(32,727)         =      13.12
corr(u_i, Xb)  = -0.0175                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 728 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -8.842122   2.812464    -3.14   0.002    -14.36364   -3.320602
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -15.70748   2.255171    -6.97   0.000     -20.1349   -11.28005
         1 2011  |  -7.741821   .6927504   -11.18   0.000    -9.101852   -6.381791
         1 2012  |  -4.618653    .647605    -7.13   0.000    -5.890052   -3.347254
         1 2013  |  -7.682826    .666354   -11.53   0.000    -8.991034   -6.374618
         1 2014  |  -3.460243   .6104712    -5.67   0.000    -4.658739   -2.261746
         1 2015  |  -6.434562   .5620505   -11.45   0.000    -7.537998   -5.331126
         2 2008  |   10.70734   1.476347     7.25   0.000      7.80893    13.60575
         2 2009  |          0  (empty)
         2 2011  |     1.8911   .6640018     2.85   0.005     .5875105     3.19469
         2 2012  |   4.172046   .8084234     5.16   0.000     2.584923    5.759169
         2 2013  |   8.136288   .9584095     8.49   0.000     6.254707    10.01787
         2 2014  |   4.696065   .6672736     7.04   0.000     3.386052    6.006078
         2 2015  |    3.61998   .5671685     6.38   0.000     2.506496    4.733463
         3 2008  |          0  (empty)
         3 2009  |   16.91438   1.249515    13.54   0.000      14.4613    19.36747
         3 2011  |   12.94663   1.107658    11.69   0.000     10.77204    15.12122
         3 2012  |   13.42344   1.137289    11.80   0.000     11.19068    15.65621
         3 2013  |   14.64942   1.192774    12.28   0.000     12.30773    16.99111
         3 2014  |   14.62971   1.043657    14.02   0.000     12.58077    16.67865
         3 2015  |   14.57121   1.037311    14.05   0.000     12.53473    16.60769
         4 2008  |   1.966074   1.193081     1.65   0.100    -.3762216    4.308369
         4 2009  |  -2.039263   .6700014    -3.04   0.002    -3.354632   -.7238949
         4 2011  |  -1.714337   .6073685    -2.82   0.005    -2.906742   -.5219313
         4 2012  |  -2.593053    .624657    -4.15   0.000      -3.8194   -1.366706
         4 2013  |   1.607687   .5583131     2.88   0.004     .5115883    2.703785
         4 2014  |   -2.67601   .6124105    -4.37   0.000    -3.878314   -1.473706
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.206123   1.430135    -1.54   0.123    -5.013811    .6015651
         2009 1  |   1.653263   1.392722     1.19   0.236    -1.080975      4.3875
         2009 2  |          0  (omitted)
         2011 1  |  -.9533501   .9567902    -1.00   0.319    -2.831752    .9250515
         2011 2  |          0  (omitted)
         2012 1  |   .4084934   1.203722     0.34   0.734    -1.954693    2.771679
         2012 2  |          0  (omitted)
         2013 1  |   .9709785   .9414888     1.03   0.303    -.8773829     2.81934
         2013 2  |          0  (omitted)
         2014 1  |   .8441202   .9852369     0.86   0.392    -1.090129    2.778369
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
       delivered |   .0048384   .0035029     1.38   0.168    -.0020385    .0117154
           _cons |   13.09446   .5316705    24.63   0.000     12.05067    14.13825
-----------------+----------------------------------------------------------------
         sigma_u |  23.130323
         sigma_e |  17.070619
             rho |  .64738657   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est2 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 3: plus lagged deliveries
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county delivered lagdelive
> red if year<2016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     15,868
Group variable: parcelnum                       Number of groups  =        728

R-sq:                                           Obs per group:
     within  = 0.1969                                         min =          2
     between = 0.0092                                         avg =       21.8
     overall = 0.0691                                         max =         25

                                                F(33,727)         =      12.35
corr(u_i, Xb)  = -0.0155                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 728 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -8.503368   2.693856    -3.16   0.002    -13.79203   -3.214703
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -16.09805    2.27504    -7.08   0.000    -20.56448   -11.63161
         1 2011  |    -7.9477    .728851   -10.90   0.000    -9.378604   -6.516796
         1 2012  |  -4.756088   .6707052    -7.09   0.000    -6.072838   -3.439338
         1 2013  |  -8.007695   .6940236   -11.54   0.000    -9.370224   -6.645165
         1 2014  |  -3.274127   .6350567    -5.16   0.000    -4.520891   -2.027363
         1 2015  |  -6.163957   .5972668   -10.32   0.000     -7.33653   -4.991383
         2 2008  |   10.60698   1.476035     7.19   0.000     7.709179    13.50478
         2 2009  |          0  (empty)
         2 2011  |    1.93646   .6674569     2.90   0.004     .6260869    3.246833
         2 2012  |   4.317216   .8186951     5.27   0.000     2.709927    5.924505
         2 2013  |   8.220991   .9591838     8.57   0.000      6.33789    10.10409
         2 2014  |   4.733341   .6803178     6.96   0.000     3.397719    6.068963
         2 2015  |    3.65442   .5757649     6.35   0.000     2.524059     4.78478
         3 2008  |          0  (empty)
         3 2009  |   16.90637    1.25417    13.48   0.000     14.44414    19.36859
         3 2011  |   12.93921    1.11441    11.61   0.000     10.75137    15.12706
         3 2012  |   13.57572   1.146669    11.84   0.000     11.32455     15.8269
         3 2013  |   14.75066   1.202711    12.26   0.000     12.38946    17.11186
         3 2014  |   14.61034   1.051534    13.89   0.000     12.54593    16.67474
         3 2015  |   14.58324   1.040771    14.01   0.000     12.53996    16.62651
         4 2008  |   1.841895   1.189893     1.55   0.122     -.494142    4.177931
         4 2009  |  -2.005631   .6709657    -2.99   0.003    -3.322893   -.6883697
         4 2011  |  -1.694225   .6096393    -2.78   0.006    -2.891089   -.4973612
         4 2012  |  -2.499296   .6251244    -4.00   0.000     -3.72656   -1.272031
         4 2013  |   1.654163   .5648827     2.93   0.004      .545167    2.763159
         4 2014  |   -2.67249   .6140668    -4.35   0.000    -3.878046   -1.466934
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |   -2.03508   1.428363    -1.42   0.155    -4.839289    .7691283
         2009 1  |    1.58087   1.398295     1.13   0.259    -1.164308    4.326049
         2009 2  |          0  (omitted)
         2011 1  |  -1.130856   .9922803    -1.14   0.255    -3.078933    .8172206
         2011 2  |          0  (omitted)
         2012 1  |   .0727737   1.217401     0.06   0.952    -2.317267    2.462815
         2012 2  |          0  (omitted)
         2013 1  |   .8644911   .9392758     0.92   0.358    -.9795256    2.708508
         2013 2  |          0  (omitted)
         2014 1  |    .832711   1.009366     0.82   0.410    -1.148909    2.814331
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
       delivered |   .0041329   .0036454     1.13   0.257    -.0030238    .0112896
    lagdelivered |   .0013615   .0012804     1.06   0.288    -.0011523    .0038753
           _cons |   13.03614   .5311421    24.54   0.000     11.99338    14.07889
-----------------+----------------------------------------------------------------
         sigma_u |  23.248598
         sigma_e |  17.117725
             rho |  .64845633   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est3 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 4:      Add control for chlorides
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county CL_zonedate if year
> <2016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     16,101
Group variable: parcelnum                       Number of groups  =        728

R-sq:                                           Obs per group:
     within  = 0.1960                                         min =          2
     between = 0.0066                                         avg =       22.1
     overall = 0.0461                                         max =         25

                                                F(32,727)         =      12.96
corr(u_i, Xb)  = -0.1075                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 728 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |   -8.50174   2.555795    -3.33   0.001    -13.51936   -3.484121
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -25.14795   6.376463    -3.94   0.000    -37.66643   -12.62947
         1 2011  |  -7.034632   .8110863    -8.67   0.000    -8.626982   -5.442281
         1 2012  |  -4.313864   .6866118    -6.28   0.000    -5.661842   -2.965885
         1 2013  |  -8.309159   .7233621   -11.49   0.000    -9.729287   -6.889031
         1 2014  |  -.8347698   1.415479    -0.59   0.556    -3.613684    1.944144
         1 2015  |  -5.907171   .6521173    -9.06   0.000    -7.187429   -4.626913
         2 2008  |   9.484095   1.588455     5.97   0.000     6.365589     12.6026
         2 2009  |          0  (empty)
         2 2011  |    1.14789   .7274432     1.58   0.115    -.2802496     2.57603
         2 2012  |   3.664717   .8618004     4.25   0.000     1.972803    5.356632
         2 2013  |   7.250486   1.096772     6.61   0.000     5.097267    9.403704
         2 2014  |   3.629163    .829391     4.38   0.000     2.000876     5.25745
         2 2015  |   2.714415   .7702305     3.52   0.000     1.202274    4.226556
         3 2008  |          0  (empty)
         3 2009  |   15.91756   1.349037    11.80   0.000     13.26909    18.56603
         3 2011  |   13.22959   1.108258    11.94   0.000     11.05382    15.40536
         3 2012  |   13.92441   1.155535    12.05   0.000     11.65583    16.19299
         3 2013  |   15.02171   1.178669    12.74   0.000     12.70771    17.33571
         3 2014  |   14.42437   1.046076    13.79   0.000     12.37068    16.47806
         3 2015  |   14.45599   1.019812    14.18   0.000     12.45386    16.45811
         4 2008  |   .6787729   1.316744     0.52   0.606    -1.906302    3.263848
         4 2009  |  -2.747866   .7991581    -3.44   0.001    -4.316799   -1.178933
         4 2011  |  -2.345915   .6691593    -3.51   0.000     -3.65963   -1.032199
         4 2012  |  -3.258068   .7246864    -4.50   0.000    -4.680796    -1.83534
         4 2013  |   .7725075   .7329902     1.05   0.292    -.6665227    2.211538
         4 2014  |  -2.997103   .6379083    -4.70   0.000    -4.249465    -1.74474
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -1.978508   1.418872    -1.39   0.164    -4.764084    .8070682
         2009 1  |   1.616371   1.392488     1.16   0.246    -1.117408    4.350149
         2009 2  |          0  (omitted)
         2011 1  |  -1.178976   .9373212    -1.26   0.209    -3.019155    .6612037
         2011 2  |          0  (omitted)
         2012 1  |   .2028008     1.1939     0.17   0.865    -2.141103    2.546705
         2012 2  |          0  (omitted)
         2013 1  |   .8262255   .9323189     0.89   0.376    -1.004133    2.656584
         2013 2  |          0  (omitted)
         2014 1  |    .842576   .9841606     0.86   0.392     -1.08956    2.774712
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
     CL_zonedate |  -.0469583   .0234754    -2.00   0.046     -.093046   -.0008705
           _cons |   17.22394   1.979428     8.70   0.000     13.33786    21.11002
-----------------+----------------------------------------------------------------
         sigma_u |  23.662058
         sigma_e |   17.07894
             rho |  .65747304   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est4 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 5: Add control for gw depth
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county gw_depth if year<20
> 16, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     16,101
Group variable: parcelnum                       Number of groups  =        728

R-sq:                                           Obs per group:
     within  = 0.1951                                         min =          2
     between = 0.0285                                         avg =       22.1
     overall = 0.0402                                         max =         25

                                                F(32,727)         =      12.87
corr(u_i, Xb)  = -0.1134                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 728 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -7.261035   2.350662    -3.09   0.002    -11.87593   -2.646138
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -18.26858   3.444688    -5.30   0.000    -25.03131   -11.50586
         1 2011  |  -8.022181   .7292451   -11.00   0.000    -9.453858   -6.590503
         1 2012  |  -4.726439   .6765403    -6.99   0.000    -6.054645   -3.398233
         1 2013  |  -8.009126   .7009832   -11.43   0.000    -9.385319   -6.632933
         1 2014  |   -3.52139   .6135683    -5.74   0.000    -4.725967   -2.316813
         1 2015  |   -6.82065   .5635081   -12.10   0.000    -7.926947   -5.714353
         2 2008  |   10.55647     1.4889     7.09   0.000     7.633416    13.47953
         2 2009  |          0  (empty)
         2 2011  |   1.958941   .7193629     2.72   0.007     .5466645    3.371217
         2 2012  |   4.491779   .8167847     5.50   0.000      2.88824    6.095317
         2 2013  |   8.406758   .9527145     8.82   0.000     6.536358    10.27716
         2 2014  |   4.820336   .6720044     7.17   0.000     3.501035    6.139636
         2 2015  |   3.809544   .5360761     7.11   0.000     2.757102    4.861986
         3 2008  |          0  (empty)
         3 2009  |    17.4008   1.266322    13.74   0.000     14.91471    19.88688
         3 2011  |   13.42109   1.145145    11.72   0.000      11.1729    15.66927
         3 2012  |   13.84971   1.152234    12.02   0.000     11.58761    16.11181
         3 2013  |   15.18376   1.191295    12.75   0.000     12.84497    17.52255
         3 2014  |   15.11715   1.050892    14.39   0.000     13.05401     17.1803
         3 2015  |   15.17025   1.006034    15.08   0.000     13.19517    17.14533
         4 2008  |   1.731759   1.195726     1.45   0.148     -.615728    4.079246
         4 2009  |  -1.993996   .6985573    -2.85   0.004    -3.365427   -.6225661
         4 2011  |  -1.681759    .660003    -2.55   0.011    -2.977498   -.3860196
         4 2012  |  -2.563798   .6708305    -3.82   0.000    -3.880794   -1.246801
         4 2013  |   1.757783   .5601186     3.14   0.002     .6581397    2.857426
         4 2014  |  -2.715624   .6146132    -4.42   0.000    -3.922253   -1.508996
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.024272    1.42486    -1.42   0.156    -4.821604    .7730588
         2009 1  |   1.594096   1.395289     1.14   0.254     -1.14518    4.333372
         2009 2  |          0  (omitted)
         2011 1  |  -1.270667   .9422551    -1.35   0.178    -3.120533    .5791986
         2011 2  |          0  (omitted)
         2012 1  |   .2143079   1.207074     0.18   0.859    -2.155458    2.584074
         2012 2  |          0  (omitted)
         2013 1  |   .8672583   .9375761     0.93   0.355    -.9734214    2.707938
         2013 2  |          0  (omitted)
         2014 1  |   .8467115   .9833069     0.86   0.389    -1.083748    2.777171
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
        gw_depth |     .02242   .0264955     0.85   0.398    -.0295969    .0744369
           _cons |   10.69809   3.364092     3.18   0.002     4.093597    17.30259
-----------------+----------------------------------------------------------------
         sigma_u |  23.868074
         sigma_e |  17.088014
             rho |  .66112889   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est5 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"       

added macro:
           e(controls) : "Y"

. *Column 6: Add controls for all
. eststo: xtreg extraction treatment i.quarter#i.year i.year#i.county delivered CL_zoneda
> te gw_depth if year<2016, fe cluster(parcelnum)
note: 1b.quarter#2008b.year identifies no observations in the sample
note: 2.quarter#2009.year identifies no observations in the sample
note: 3.quarter#2008b.year identifies no observations in the sample
note: 4.quarter#2015.year omitted because of collinearity
note: 2009.year#2.county_code omitted because of collinearity
note: 2011.year#2.county_code omitted because of collinearity
note: 2012.year#2.county_code omitted because of collinearity
note: 2013.year#2.county_code omitted because of collinearity
note: 2014.year#2.county_code omitted because of collinearity
note: 2015.year#1b.county_code omitted because of collinearity
note: 2015.year#2.county_code omitted because of collinearity

Fixed-effects (within) regression               Number of obs     =     16,101
Group variable: parcelnum                       Number of groups  =        728

R-sq:                                           Obs per group:
     within  = 0.1970                                         min =          2
     between = 0.0304                                         avg =       22.1
     overall = 0.0365                                         max =         25

                                                F(34,727)         =      12.35
corr(u_i, Xb)  = -0.1310                        Prob > F          =     0.0000

                                (Std. Err. adjusted for 728 clusters in parcelnum)
----------------------------------------------------------------------------------
                 |               Robust
      extraction |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------------+----------------------------------------------------------------
       treatment |  -9.176718   2.844201    -3.23   0.001    -14.76055   -3.592889
                 |
    quarter#year |
         1 2008  |          0  (empty)
         1 2009  |  -19.48625   3.463343    -5.63   0.000     -26.2856    -12.6869
         1 2011  |  -6.964338   .8135627    -8.56   0.000    -8.561551   -5.367125
         1 2012  |  -4.210959   .7078753    -5.95   0.000    -5.600683   -2.821235
         1 2013  |  -7.782619   .6756269   -11.52   0.000    -9.109031   -6.456206
         1 2014  |  -2.023478   .9623678    -2.10   0.036    -3.912829    -.134126
         1 2015  |  -6.004563   .6268528    -9.58   0.000    -7.235221   -4.773905
         2 2008  |   10.18916   1.519079     6.71   0.000     7.206854    13.17146
         2 2009  |          0  (empty)
         2 2011  |    1.76676   .7157718     2.47   0.014     .3615335    3.171986
         2 2012  |   3.987243   .8419496     4.74   0.000     2.334301    5.640186
         2 2013  |   7.671702   1.014746     7.56   0.000     5.679519    9.663885
         2 2014  |   4.103346   .7100521     5.78   0.000     2.709349    5.497344
         2 2015  |   3.069535   .6113716     5.02   0.000      1.86927      4.2698
         3 2008  |          0  (empty)
         3 2009  |    16.4097   1.296483    12.66   0.000     13.86441      18.955
         3 2011  |   13.21087   1.145919    11.53   0.000     10.96117    15.46058
         3 2012  |   13.73396   1.161274    11.83   0.000     11.45411    16.01381
         3 2013  |   14.75257   1.198831    12.31   0.000     12.39899    17.10616
         3 2014  |   14.35605   1.053931    13.62   0.000     12.28693    16.42516
         3 2015  |   14.28365    1.05218    13.58   0.000     12.21797    16.34932
         4 2008  |   1.446124   1.247319     1.16   0.247    -1.002654    3.894902
         4 2009  |  -2.221172   .6887501    -3.22   0.001    -3.573349    -.868996
         4 2011  |  -1.765821   .6581557    -2.68   0.007    -3.057933   -.4737081
         4 2012  |  -2.748208   .6741669    -4.08   0.000    -4.071754   -1.424661
         4 2013  |   1.214509   .6130098     1.98   0.048      .011028     2.41799
         4 2014  |  -2.810715   .6170102    -4.56   0.000    -4.022049    -1.59938
         4 2015  |          0  (omitted)
                 |
year#county_code |
         2008 2  |  -2.191647   1.434813    -1.53   0.127    -5.008518    .6252237
         2009 1  |   1.529143   1.395927     1.10   0.274    -1.211385    4.269671
         2009 2  |          0  (omitted)
         2011 1  |  -1.039305   .9593874    -1.08   0.279    -2.922805    .8441954
         2011 2  |          0  (omitted)
         2012 1  |   .2521838   1.211177     0.21   0.835    -2.125639    2.630007
         2012 2  |          0  (omitted)
         2013 1  |   .8569297   .9398246     0.91   0.362    -.9881644    2.702024
         2013 2  |          0  (omitted)
         2014 1  |   .8310814   .9833209     0.85   0.398    -1.099406    2.761569
         2014 2  |          0  (omitted)
         2015 1  |          0  (omitted)
         2015 2  |          0  (omitted)
                 |
       delivered |   .0041158   .0034489     1.19   0.233    -.0026551    .0108867
     CL_zonedate |  -.0249064   .0131832    -1.89   0.059    -.0507881    .0009753
        gw_depth |   .0287964   .0265903     1.08   0.279    -.0234065    .0809994
           _cons |   11.53416   3.431262     3.36   0.001     4.797794    18.27052
-----------------+----------------------------------------------------------------
         sigma_u |  24.034242
         sigma_e |  17.069053
             rho |   .6647256   (fraction of variance due to u_i)
----------------------------------------------------------------------------------
(est6 stored)

.         estadd local wellFE "Y"

added macro:
             e(wellFE) : "Y"

.         estadd local timeFE "Y"

added macro:
             e(timeFE) : "Y"

.         estadd local controls "Y"

added macro:
           e(controls) : "Y"

. esttab using "Tables\Parcel_Extract_DinD_robust_unbalanced_$outputdate.tex", label repl
> ace ///
>         se star(* .10 ** .05 *** .01) ///
>         addnote(Table reports results from diff-in-diff regression. Standard errors are
>  clustered at the parcel level. Chloride measures groundwater salinity.  Time FE are qu
> arter-year interactions.) ///
>         keep(_cons treatment) ///
>         scalars("wellFE Parcel FE" "timeFE Quarter-Year FE" "controls County-Year FE") 
> ///
>         cells(b(star fmt(2)) se(par fmt(2)))
(note: file Tables\Parcel_Extract_DinD_robust_unbalanced_20231129.tex not found)
(output written to Tables\Parcel_Extract_DinD_robust_unbalanced_20231129.tex)

. eststo clear

. 
. log close
      name:  <unnamed>
       log:  D:\Ellen\Dropbox\Pajaro_AgInnovation\Submission\JAERE\Replication_Code\Log\D
> inD_quarterly_unbalanced_log.log
  log type:  text
 closed on:  29 Nov 2023, 14:09:17
-----------------------------------------------------------------------------------------
